<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>querySelectorAll()方法</title>
	<script>
		function changeContent(){
			var pEle = document.querySelector('.t1');
			pEle.innerHTML = '中华人民共和国';
		}
	</script>
</head>
<body>
	<p class="t1">段落</p>
	<div class="t1">DIV</div>
	<h2 class="t1">标题</h2>
	<h3 class="t1">标题</h3>
	<div class="t1">DIV</div>
	<input type="button" value="设置使用.t1类的第一对象的内容" onclick="changeContent()">
</body>
</html>